package com.model._do.login_do;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Setter
@Getter
@NoArgsConstructor
public class LoginToDO {

    public LoginToDO(String code){
        this.code = code;
    }

    private static String requestUrl = "https://api.weixin.qq.com/sns/jscode2session?";

    private static String grantType = "authorization_code";

    private static String appId = "wx9d2021001b474041";

    private String secret = "3d6a98b85c11b1369ca02eb7d8fe17ed";

    private String code;

    private String test;

    private String testCode;

    @Override
    public String toString() {
        return String.format(
                "https://api.weixin.qq.com/sns/jscode2session?appid=wx9d2021001b474041&secret=3d6a98b85c11b1369ca02eb7d8fe17ed" +
                        "&js_code=%s" +
                        "&grant_type=authorization_code",
                code
        );
    }
}
